Learn R Programming

disto (version 0.2.0)

`[[.disto`: Extract a single value from disto object

Description

Extract a single value from disto object in matrix style extraction and via direct indexing. This does not support using names. This is faster than link{extract}. For dist backend see: dist_extract.

Usage

# S3 method for disto
[[(x, i, j, k)

Arguments

x

object of class 'disto'

i

(integer vector) row index

j

(integer vector) column index

k

(integer vector) direct index

Value

(A real number) Distance value

Examples

Run this code
# NOT RUN {
temp <- stats::dist(iris[,1:4])
dio  <- disto(objectname = "temp")
dio

dio[[1, 2]]
dio[[2, 1]]
dio[[k = 3]]
# }

Run the code above in your browser using DataLab